#ifndef __LIB_STRING_BUILDER_H__
#define __LIB_STRING_BUILDER_H__ 

#include "libutilsbase.h"

LIB_NS_BEGIN

class LIBAPI StringBuilder
{
public:
	StringBuilder();
	StringBuilder(size_t capi);
	~StringBuilder(void);

public:
	void Append(TCHAR value);
	void Append(const TCHAR *value);
	void Append(const tstring &value);
		
private:
	void _resize(int32 newlen);
	void _init(int32 cap);
	void _appendend();
		
public:
	tstring ToString();

private:
	TCHAR *_buff;
	int32 _bufflen;
	int32 _pos;

	//DESABLE_COPY_AND_ASSIGN(StringBuilder);
};

LIB_NS_END
#endif